function addUserView() {
  location.href = "/user";
}

function edit(id) {
  console.log("修改", id);
  // location.href = `/user/${id}`;
}

function del(id) {
  let url = `/user/${id}`;
  if (confirm(`是否删除id为 ${id} 的用户`)) {
    let tr = document.querySelector(`#id`);
    axios.delete(url).then((res) => {
      res.status === 200 ? tr.remove() : "";
    });
  }
}
